<!DOCTYPE html>
<html lang="zh_CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>jn - javascript function framework</title>
<link href="libs/bootstrap/css/bootstrap.css" rel="stylesheet">

<script src="libs/js/sea.js"></script>
<script src="libs/js/jquery-1.12.4.js"></script>
<script src="libs/js/vue.js"></script>

<script src="libs/crypto-js/core.js"></script>
<script src="libs/crypto-js/md5.js"></script>
<script src="libs/crypto-js/sha1.js"></script>
<script src="libs/crypto-js/enc-base64.js"></script>

<script src="libs/rsa/BigInt.js"></script>
<script src="libs/rsa/RSA.js"></script>
<script src="libs/rsa/Barrett.js"></script>

<script src="src/jn.js"></script>

<script>

</script>
</head>

<body>

<div class="container">
    <div class="row">
        <div class="col-md-8">
            a
        </div>
        <div class="col-md-2">
            b
        </div>
    </div>
</div>

<a href="index_load_by_requirejs.html" target="_blank">Example load js by require.js</a>

<textarea id="jsonString" style="width:500px;height:300px;">
{
    "code": 0,
    "message": "ok成功了.",
    "data": [1,2,4]
}
</textarea><br><br>

<button id="_StringToJSON">StringToJSON</button><br>

<button onclick="_RSA()">RSA</button>

<script>
function _StringToJSON() {
    var str = $('#jsonString').html();
    var obj = $.parseJSON(str);
    console.log(obj);
}

$('#_StringToJSON').click(function() {
    _StringToJSON();
});

function _RSA() {
    var exponent = '010001';
    var modulus = '00b505077906f7e7ab6281ed8de67f90308964b05bd0bd6384fe58398cc9b2e623ead2d057ced6289a7c8204f154db2ed34b58809303cb91563628478d1343ee2150fd6f28b1a25d7f0cb2fc242cf649b15045bd80b2de84272bc5907db06b23d32c547ebd8bd1041c91215764e78b5026d489b6dcd17644ec0bdb6a8769ff7b65';

    var rsa = new RSA();
    rsa.setPublic(modulus, exponent);
    var str = rsa.encrypt('1');
    console.log(str);
}
</script>
</body>
</html>
